package com.patMall.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author 750909637@qq.com
 * @PackageName patMall
 * @Package com.patMall.entity
 * @Date 2024/1/20 14:40
 * @Version 1.0
 */
public class OrderInfo {
    private Long orderId;
    private Integer userId;
    private Integer commodityId;
    private Integer addressId;
    private int number;
    private String paymentMethod;
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date orderTime;
    private BigDecimal totalAmount;
    private int state;
    private User user;
    private Commodity commodity;
    private UserAddress address;

    public OrderInfo() {
    }

    @Override
    public String toString() {
        return "OrderInfo{" +
                "orderId=" + orderId +
                ", userId=" + userId +
                ", commodityId=" + commodityId +
                ", addressId=" + addressId +
                ", number=" + number +
                ", paymentMethod='" + paymentMethod + '\'' +
                ", orderTime=" + orderTime +
                ", totalAmount=" + totalAmount +
                ", state=" + state +
                ", user=" + user +
                ", commodity=" + commodity +
                ", address=" + address +
                '}';
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getCommodityId() {
        return commodityId;
    }

    public void setCommodityId(Integer commodityId) {
        this.commodityId = commodityId;
    }

    public Integer getAddressId() {
        return addressId;
    }

    public void setAddressId(Integer addressId) {
        this.addressId = addressId;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getPaymentMethod() {
        return paymentMethod;
    }

    public void setPaymentMethod(String paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    public Date getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Commodity getCommodity() {
        return commodity;
    }

    public void setCommodity(Commodity commodity) {
        this.commodity = commodity;
    }

    public UserAddress getAddress() {
        return address;
    }

    public void setAddress(UserAddress address) {
        this.address = address;
    }
}

